package com.woniu.adminservice.controller;

import com.woniu.adminservice.service.DataStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.*;
/**
 * Description : TODO 返回前端图表所需数据 <br/>
 * ChangeLog : 1. 创建 (2020/3/24 17:48 [82432]);
 *
 * @author huangjing
*/
@Controller
@RequestMapping("/data")
public class DataStatistics {
@Autowired
DataStatisticsService dataStatisticsService;
 @GetMapping("/chartOne")
    @ResponseBody
    public Map histogram(){
     List data=dataStatisticsService.registerPeople();
     HashMap map = new HashMap();
     map.put("data",data);
     return map;
 }
// @GetMapping("/chartTwo")
// @ResponseBody
// public Map chartTwo(){
////  ArrayList chartX = new ArrayList();
////  ArrayList data=new ArrayList();
////  HashMap map = new HashMap();
////  Calendar calendar = Calendar.getInstance();
////  calendar.get(Calendar.MONTH);
// }
}
